* To weigh data run the following syntax.
WEIGHT by WEIGHT.

*** For Figure1 run the following syntax (data are not weighted in this case).
WEIGHT off.
CROSSTABS Incumbency by year.

***For Table1 run the following syntax.
WEIGHT by WEIGHT.
NOMREG Argument (BASE=FIRST ORDER=ASCENDING) BY PoliticalPartyRevCod IncumbencyRevCod InElectoralCampaignRevCod MigrantGroupRevCod
  /CRITERIA CIN(95) DELTA(0) MXITER(100) MXSTEP(5) CHKSEP(20) LCONVERGE(0) PCONVERGE(0.000001) 
    SINGULAR(0.00000001)
  /MODEL= PoliticalPartyRevCod IncumbencyRevCod PoliticalPartyRevCod*IncumbencyRevCod InElectoralCampaignRevCod MigrantGroupRevCod
  /STEPWISE=PIN(.05) POUT(0.1) MINEFFECT(0) RULE(SINGLE) ENTRYMETHOD(LR) REMOVALMETHOD(LR)
  /INTERCEPT=INCLUDE
  /PRINT=PARAMETER SUMMARY LRT CPS STEP MFI.

***For Table 2 run the following syntax.
LOGISTIC REGRESSION VARIABLES Position
  /METHOD=ENTER PoliticalParty
  /METHOD=ENTER Incumbency
  /METHOD=ENTER InElectoralCampaign
  /METHOD=ENTER MigrantGroup
  /CONTRAST (PoliticalParty)=Indicator(2) 
  /CONTRAST (Incumbency)=Indicator(1)
  /CONTRAST (InElectoralCampaign)=Indicator(1)
  /CONTRAST (MigrantGroup)=Indicator(1)
  /CLASSPLOT
  /PRINT=GOODFIT CI(95)
  /CRITERIA=PIN(0.05) POUT(0.10) ITERATE(20) CUT(0.5).

LOGISTIC REGRESSION VARIABLES Position
  /METHOD=ENTER PoliticalParty
  /METHOD=ENTER Incumbency
  /METHOD=ENTER InElectoralCampaign
  /METHOD=ENTER MigrantGroup
  /METHOD=ENTER PoliticalParty*Incumbency
  /CONTRAST (PoliticalParty)=Indicator(2) 
  /CONTRAST (Incumbency)=Indicator(1)
  /CONTRAST (InElectoralCampaign)=Indicator(1)
  /CONTRAST (MigrantGroup)=Indicator(1)
  /CLASSPLOT
  /PRINT=GOODFIT CI(95)
  /CRITERIA=PIN(0.05) POUT(0.10) ITERATE(20) CUT(0.5).

*For Figure2 run the following syntax.
LOGISTIC REGRESSION VARIABLES Position
  /METHOD=ENTER PoliticalParty
  /METHOD=ENTER Incumbency
  /METHOD=ENTER InElectoralCampaign
  /METHOD=ENTER MigrantGroup
  /METHOD=ENTER PoliticalParty*Incumbency
  /CONTRAST (PoliticalParty)=Indicator(2) 
  /CONTRAST (Incumbency)=Indicator(1)
  /CONTRAST (InElectoralCampaign)=Indicator(1)
  /CONTRAST (MigrantGroup)=Indicator(1)
  /CLASSPLOT
  /PRINT=GOODFIT CI(95)
  /CRITERIA=PIN(0.05) POUT(0.10) ITERATE(20) CUT(0.5)
  /SAVE PRED (PREDPRO1).
GRAPH /BAR(SIMPLE)=MEAN(PREDPRO1)  BY PoliticalParty BY Incumbency.
